<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<title>css3鼠标移上图片放大遮罩效果</title>
</head>

<style type="text/css">
body {
	text-align:center;
	/*background: none repeat scroll 0 0 #F8F7F5;*/
	background: none repeat scroll 0 0 #FFFFFF;
	/*background-image:url(../images/bg/brushed_alu.png);*/
	color: #222222;
	font-family:"微软雅黑";
	line-height: 1.6;
}
a{
	font-family: arial,"Hiragino Sans GB","Microsoft Yahei",sans-serif;
	font-size:14px;
	color:#333;
	text-decoration:none;
	}
#wrapper {
	max-width:260px;
	width:100%;
	margin:0px auto;
	margin-top:10px;
}


/* main_img */
.main_img{
    height: 180px;
    width: 250px;
	overflow:hidden;
	position: relative;
}
.main_img img{
	height: 180px;
    width: 250px;
    overflow-x: hidden;
    overflow-y: hidden;
    position: relative;
	z-index:1;
	transition-delay: 0s;
    transition-duration: 1s;
    transition-property: all;
    transition-timing-function: ease;
	/* Firefox 4 */
	-moz-transition-delay: 0s;
    -moz-transition-duration: 1s;
    -moz-transition-property: all;
    -moz-transition-timing-function: ease;
	/* Safari 和 Chrome */
	-webkit-transition-delay: 0s;
    -webkit-transition-duration: 1s;
    -webkit-transition-property: all;
    -webkit-transition-timing-function: ease;
	/* Opera */
	-o-transition-delay: 0s;
    -o-transition-duration: 1s;
    -o-transition-property: all;
    -o-transition-timing-function: ease;
	}
.main_img .show {
    background: rgba(0, 0, 0, 0.4);
    height:180px;
    left: 0;
    opacity: 0;
	filter:alpha(opacity=0);
    position: absolute;
    top: 0;
    transition-delay: 0s;
    transition-duration: 0.3s;
    transition-property: opacity;
    transition-timing-function: ease-in;
	/* Firefox 4 */
	-moz-transition-delay: 0s;
    -moz-transition-duration: 0.3s;
    -moz-transition-property: opacity;
    -moz-transition-timing-function: ease-in;
	/* Safari 和 Chrome */
	-webkit-transition-delay:0s;
    -webkit-transition-duration: 0.3s;
    -webkit-transition-property: opacity;
    -webkit-transition-timing-function: ease-in;
	/* Opera */
	-o-transition-delay:0s;
    -o-transition-duration: 0.3s;
    -o-transition-property: opacity;
    -o-transition-timing-function: ease-in;
    width:250px;
    z-index: 200;
}
.main_img .show .imgArea {
    left: 50%;
	bottom:0;
    margin:-15px 0px 0px -40px;
    opacity: 0;
    position: absolute;
    transition-delay: 0s;
    transition-duration: 0.4s;
    transition-property: all;
    transition-timing-function: ease;
	/* Firefox 4 */
	-moz-transition-delay: 0s;
    -moz-transition-duration: 0.4s;
    -moz-transition-property: all;
    -moz-transition-timing-function: ease;
	/* Safari 和 Chrome */
	-webkit-transition-delay:0s;
    -webkit-transition-duration: 0.4s;
    -webkit-transition-property: all;
    -webkit-transition-timing-function: ease;
	/* Opera */
	-o-transition-delay:0s;
    -o-transition-duration: 0.4s;
    -o-transition-property: all;
    -o-transition-timing-function: ease;
}
.main_img .show .imgArea a{
	color:rgba(255,255,255, 0.8);
	display:block;
	padding:5px 12px;
	border:rgba(255,255,255, 0.6) 1px solid;
	border-radius:8px;
	font-size: 16px;
}
.main_img .show .imgArea a:hover{
	background: rgba(255,255,255, 0.7);
	color:rgba(0,0,0, 0.6);
}
.main_img:hover  .show {opacity: 1;filter:alpha(opacity=100);}
.main_img:hover .show .imgArea{opacity:1;filter:alpha(opacity=100);bottom:40%;}
.main_img:hover img {
	transform: scale(1.2, 1.2);
	-ms-transform:scale(1.2, 1.2); 	/* IE 9 */
	-moz-transform:scale(1.2, 1.2); 	/* Firefox */
	-webkit-transform:scale(1.2, 1.2); /* Safari 和 Chrome */
	-o-transform:scale(1.2, 1.2); 	/* Opera */
}
.title{
	color:#000;
	font-family:"微软雅黑";
	text-align:center;
	margin:0;
	padding:20px;
	
	}
</style>
<body>
<h1>css3鼠标移上图片放大遮罩效果</h1>
<div id="wrapper">
	
	 <div class="main_img">
		 <img src="images/pic_01.jpg">
		 <div class="show">
			<span class="imgArea"><a title="观看视频" href="#">观看视频</a></span>
		 </div>
	</div><!--main_img end-->
	
</div>

</body>
</html>